package com.szq.pattern;

import com.szq.pattern.bean.Chair;
import com.szq.pattern.bean.Sofa;
import com.szq.pattern.bean.Table;
import com.szq.pattern.factory.AbstractFactory;

/**
 * @description:
 * @author: szq
 * @date: 2021-09-02 14:01:21
 */
public class Client {

    private Sofa mySofa;

    private Chair myChair;

    private Table myTable;

    //通过抽象工厂来生产家具
    public Client(AbstractFactory af){
        mySofa = af.createSofa();
        myChair = af.createChair();
        myTable = af.createTable();
    }
}
